import {Rtf} from './rtf/rtf.class';

const rtf = new Rtf();

function htmlToRtf(html: string) {
    let _html = html;
    if(!_html.includes('<html')) {
        _html=`
<html>
    <head></head>
    <body>
    ${html}
    </body>
</html>`;
    }
    return rtf.convertHtmlToRtf(_html);
}

export default htmlToRtf;
